﻿using Engine;
using Scheduler;
using EventArgs = Scheduler.EventArgs;

namespace InterfaceService.Testing
{
    internal class DeviceUnderTestHandler:Middleware
    {
        public override bool Filter(Context ctx, EventArgs args)
        {
            return args.Id == EventId.PassBegin || args.Id == EventId.PassEnd;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="args"></param>
        protected override void DoHandleEvent(Context ctx, EventArgs args)
        {
            if (!(ctx is WaferTesterContext context))
                return;

            switch (args.Id)
            {
                case EventId.PassBegin:
                     
                    break;
                case EventId.PassEnd:
                    var chipResult = context.Result.GetChipResultById(context.DUT);



                    break;
                default:
                    break;
            }
        }
    }
}
